#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.common.emum;

/**
 * Description: ReturnCodeEnum
 *
 * @author wupanhua
 * @date 2019/8/6 15:28
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
public enum ReturnCodeEnum implements DadyEnum {

    /**
     * 系统错误码
     */
    SUCCESS(200, "执行成功"),
    PARAMETER_NOT_MATCH(204, "参数列表错误(缺少或格式不匹配)"),
    UNAUTHORIZED(401, "未授权"),
    RESOURCE_NOT_FOUND(404, "资源不存在或不可用"),
    OVERLOAD(503, "服务器拥挤，让我休息一会儿吧～"),
    PERMISSION_DENIED(403, "访问受限"),
    CURRENT_ELEMENT_WAS_OCCUPIED(409, "资源冲突或被锁定"),
    SYSTEM_ERROR(500, "系统异常"),
    TOKEN_INVALID(600,"身份令牌缺失或已失效，请重新登录"),
    ERROR(999, "执行失败"),

    /**
     * 业务错误码 100-200
     */
    LOGIN_FAIL(100, "账户或密码错误"),
	USER_NOT_IN_SESSION(101, "SESSION中不存在当前用户"),
	VALIDATE_CODE_WRONG(102, "验证码错误"),
    ;

    private Integer code;
    private String msg;

    ReturnCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }


    @Override
    public String getMsg() {
        return msg;
    }
}
